import os, sys

try:
	import pygtk
	pygtk.require ("2.0")
	import gtk
	import gobject
except:
	sys.exit (1)

import smartglade

class window1(smartglade.xml):
	def __init__(self):
		smartglade.xml.__init__(self, 'test1.glade')
		self.get('window1')
		self.window = self.window1
		
		self.window.connect("destroy", self.window_destroy)
		self.button1.connect ("clicked", self.button1_cb)
		
	def run(self):
		self.window.show_all()
		gtk.main()
	
	def window_destroy(self, *args):
		self.window.destroy()
		gtk.main_quit()
	
	def button1_cb(self, *args):
		self.window.destroy()

if __name__ == '__main__':
	window1().run()